package com.lyc.dao;

import com.lyc.entity.Order;
import com.lyc.entity.qo.OrderQo;
import com.lyc.entity.vo.OrderUsernameVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(String oid);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(String oid);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    void updateStatusByOid(String oid, Integer status);

    List<Order> selectByUidAndStatusWithPage(@Param(value = "uid") Integer uid, @Param(value = "status") Integer status,
                                             @Param(value = "start") Integer start, @Param(value = "pageSize") Integer pageSize);

    int selectCountByUidAndStatus(@Param(value = "uid") Integer uid, @Param(value = "status") Integer status);

    int selectCountByConditions(OrderQo qo);

    List<OrderUsernameVo> selectByConditions(OrderQo qo);

    void deleteBatchByOids(List<String> list);
}